package com.itheima.dao;


import com.itheima.pojo.CheckItem;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface CheckItemMapper {

    @Insert("insert into t_checkitem (code,name,sex,age,price,type,remark,attention) values (#{code},#{name},#{sex},#{age},#{price},#{type},#{remark},#{attention})")
    void CheckItemAdd(CheckItem checkItem);

    List<CheckItem> findPage(@Param("queryString") String queryString);

    void CheckItemUpdata(CheckItem checkItem);

    @Delete("delete from t_checkitem where id = #{id}")
    void CheckItemDelete(@Param("id")Integer id);

    @Select("select * from t_checkitem where id = #{id}")
    CheckItem findById(@Param("id") Integer id);

    @Select("select count(*) from t_checkgroup_checkitem where checkitem_id = #{id}")
    Integer findCountById(@Param("id")Integer id);

    @Select("select * from t_checkitem")
    List<CheckItem> checkItemFindAll();
}
